Quiz 10
Question # 1
Which query/queries will return alternate rows from a table containing customer data?
A)
Select customerId from (Select rowId, customerId from customer) where mod(rowId,2)=1
B)
Select customerId from (Select rowId, customerId from customer) where mod(rowId,2)=0
C)
Select customerId from (Select odd(rowId) from customer);
D)
Select alternate(customerId) from customer;
Question # 2
Imagine we have a table of users. What will be the output of the following query?
SELECT name, COUNT(email)
FROM users
GROUP BY email
HAVING COUNT(email) > 1
A)
It displays the email addresses of all users.
B)
It finds all duplicate records based on email address.
C)
It groups all email addresses.
Question # 3
Which statements are true for INSERT triggers?
A)
INSERT triggers have access to NEW values only.
B)
INSERT triggers have access to both NEW and OLD values.
C)
BEFORE INSERT triggers can access and change the NEW values.
D)
AFTER INSERT triggers can only access but not change the NEW values.
Question # 4
UPDATE triggers can view and update the NEW value of a column and only view but not update the OLD value.
A)
True. UPDATE Triggers have access to both NEW and OLD values.
B)
False. AFTER UPDATE triggers cannot update the OLD values.
Question # 5
There is no NEW value associated with the DELETE Trigger.
A)
True
B)
False